package com.red.star.wechat.data.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Table;
import java.util.Date;

/**
 * @ProjectName: macalline-work-server
 * @Package: com.red.star.macalline.data.entity
 * @Description: 华为隐私通话 手机号绑定关系表
 * @Author: AMGuo
 * @CreateDate: 2018/8/31 下午1:56
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_hosting_voice")
public class HostingVoice extends BaseEntity {

    /**
     * 手机号a
     */
    private String aParty;

    /**
     * 手机号b
     */
    private String bParty;

    /**
     * 虚拟号码
     */
    private String virtualNumber;

    /**
     * subscriptionId
     */
    private String subscriptionId;

    /**
     * 绑定时间
     */
    private Date bindTime;

    /**
     * 解绑时间
     */
    private Date unBindTime;

    /**
     * 绑定结束时间（绑定时设置）
     */
    private Date endTime;

    /**
     * 绑定状态 0 解绑  1绑定
     */
    private Integer status;

    public HostingVoice(String aParty, String bParty, String virtualNumber, String subscriptionId, Date bindTime, Integer status) {
        this.aParty = aParty;
        this.bParty = bParty;
        this.virtualNumber = virtualNumber;
        this.subscriptionId = subscriptionId;
        this.bindTime = bindTime;
        this.status = status;
    }

    public void init(String aParty, String bParty, Date bindTime, Integer status, Date endTime) {
        this.aParty = aParty;
        this.bParty = bParty;
        this.bindTime = bindTime;
        this.status = status;
        this.endTime = endTime;
    }

}
